package com.hr.feign.user;

import com.hr.entity.AoaSysMenu;
import com.hr.entity.AoaUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * AoaUserController 接口
 */
@FeignClient(value = "oa-user",contextId = "1")
public interface OaUserFeignService {

    /**
     * 根据用户名查询出单个用户
     * @return
     */
    @GetMapping("/aoaUser/queryByUserName")
    public ResponseEntity<AoaUser> queryByUserName(
            @RequestParam("userName") String userName
    );

    /**
     * 根据角色ID 获取该角色拥有的菜单列表
     * @return
     */
    @GetMapping("/aoaSysMenu/queryListByRoleId")
    public ResponseEntity<List<AoaSysMenu>> queryListByRoleId(
            @RequestParam("roleId") Long roleId
    );



}
